package com.hanbang.maige.mode.httpresponse;

import com.hanbang.maige.mode.javabean.base.BannerAdData;
import com.hanbang.maige.mode.javabean.home.NewsItemData;
import com.hanbang.maige.mode.javabean.huodong.HuoDongItemData;

import java.util.ArrayList;

/**
 * 作者　　: 李坤
 * 创建时间:2016/10/26　14:37
 * 邮箱　　：496546144@qq.com
 * <p>
 * 功能介绍：
 */

public class HomeResponse extends BaseHttpResponse {

    public ArrayList<BannerAdData> guanggao;
    public ArrayList<NewsItemData> News;
    public ArrayList<HuoDongItemData> huodong;

    public static HomeResponse init() {
        HomeResponse homeResponse = new HomeResponse();
        homeResponse.guanggao = new ArrayList<>();
        homeResponse.News = new ArrayList<>();
        homeResponse.huodong = new ArrayList<>();
        return homeResponse;
    }

    public void addData(HomeResponse response) {
        clear();

        guanggao.addAll(response.getGuanggao());
        News.addAll(response.getNews());
        huodong.addAll(response.getHuodong());
    }

    public void clear() {
        guanggao.clear();
        News.clear();
        huodong.clear();
    }


    public ArrayList<BannerAdData> getGuanggao() {
        return guanggao;
    }

    public ArrayList<HuoDongItemData> getHuodong() {
        return huodong;
    }

    public ArrayList<NewsItemData> getNews() {
        return News;
    }
}
